stringlist: Make one constructor call the other
authorBenjamin Otte <otte@redhat.com>
Tue, 30 Jun 2020 17:35:04 +0000 (19:35 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 5 Jul 2020 00:59:21 +0000 (02:59 +0200)
Simplifies code.

gtk/gtkstringlist.c

index 2b43f70e5d7e5b26e816e0ae960270fd239fe685..70290fe24f36e0eeea15cff1d33bb5b7d7f1d9fc 100644 (file)
@@ -145,17 +145,6 @@ gtk_string_object_class_init (GtkStringObjectClass *class)
 
 }
 
-static GtkStringObject *
-gtk_string_object_new (const char *string)
-{
-  GtkStringObject *result;
-
-  result = g_object_new (GTK_TYPE_STRING_OBJECT, NULL);
-  result->string = g_strdup (string);
-
-  return result;
-}
-
 static GtkStringObject *
 gtk_string_object_new_take (char *string)
 {
@@ -167,6 +156,12 @@ gtk_string_object_new_take (char *string)
   return obj;
 }
 
+static GtkStringObject *
+gtk_string_object_new (const char *string)
+{
+  return gtk_string_object_new_take (g_strdup (string));
+}
+
 /**
  * gtk_string_object_get_string:
  * @self: a #GtkStringObject